package com.rj.bd.kj.dc.des;

public class DataMaskingUtil {

    private static final String DEFAULT_KEY = "12345678"; // 8字节密钥，DES要求

    /**
     * @desc  加密
     * @param data
     * @return
     */
    public static String encrypt(String data) {
        DESDataMaskingService service = new DESDataMaskingService(DEFAULT_KEY);
        return service.encrypt(data);
    }

    /**
     * @desc  解密
     * @param maskedData
     * @return
     */
    public static String decrypt(String maskedData) {
        DESDataMaskingService service = new DESDataMaskingService(DEFAULT_KEY);
        return service.decrypt(maskedData);
    }
}
